package com.javasm.adminapi.common.exception;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ExceptionEnum {

    Server_Error(9000,"服务器异常"),
    SQL_Error(9001,"数据操作异常"),
    Token_Expired_Error(9002,"Token过期"),
    Token_Unsupported_Error(9003,"Token未授权"),
    Token_Signature_Error(9004,"Token签名错误"),

    Parameter_Null(1001,"参数异常"),
    User_Not_Found(1002,"用户不存在"),
    Not_Login(1003,"用户未登录"),
    UserNamePassword_Error(1004,"用户名或密码错误"),
    User_Exist(1005,"用户已经存在"),
    Code_Error(1006,"验证码错误"),
    Condition_Null(1007,"请选择查询条件"),
    Spu_Not_Exist(1008, "商品不存在"),
    Spu_Upadate_Error(1009, "商品更新失败"),
    Old_Password_Error(1008,"旧密码错误"),
    Role_Delete_Error(1009, "此角色下有用户，请先删除用户"),
   // User_Error(1010, "登录过期，请重新登录"),
    UrlOrName(1011,"菜单网址或名称重复" ),
    Report_null(2001, "审核记录异常"),


    User_Error(1010, "登录过期，请重新登录"),
    Category_Null(2001,"商品类目不存在"),
    Category_Is(2002, "商品类目已存在"),
    Category_Is_Not_Null(2003, "该类目下有二级目录");
    private Integer code;
    private String msg;
}
